import { request_post, request_get, request_put, request_delete } from 'services/common/request';
import pathToRegexp from 'path-to-regexp';
let toPathGroup = pathToRegexp.compile('/api/data_articles/groups/:id');
/**
 * 赛事列表
 * @param {Object} data
 * @param {String} data.name - 选填 名称
 * @param {String} data.pageStart
 * @param {String} data.pageOffset
 * @param {String} data.pageNum
 */
export function getList(data = {}) {
	return request_get('/race/list', data);
}

/**
 * 赛事添加
 * @param {Object} data
 * @param {String} data.name - 选填 名称
 * @param {String} data.username
 * @param {String} data.password
 */
export function save(data = {}) {
	return request_post('/race/save', data);
}

/**
 * 赛事列表删除
 * @param {Object} data
 * @param {String} data.name - 选填 名称
 * @param {String} data.username
 * @param {String} data.password
 */
export function del(data = {}) {
	return request_post('/race/delete', data);
}